using UnityEngine;

public class TestAd : MonoBehaviour
{
    private AdManager AdManager;
    // Start is called before the first frame update
    void Start()
    {
        AdManager = new AdManager();
        //AdManager.Init();
    }

    public void LoadVideoAd()
    {
        AdManager.LoadVideoAd();
    }

    public void PlayVideoAd()
    {
        AdManager.PlayVideoAd(delegate
            {
                GameDebug.Log("Play video suc");
            }, 
            delegate { 
                GameDebug.Log("Play video closed"); 
            },
            
            delegate { 
                GameDebug.Log("Play video failed");
            } );
    }

    public void LoadInterstitialAd()
    {
        AdManager.LoadInterstitialAd();
    }

    public void ShowInterstitialAd()
    {
        AdManager.ShowInterstitialAd(delegate
            {
                GameDebug.Log("Play video suc");
            }, 
            delegate { 
                GameDebug.Log("Play video closed"); 
            },
            
            delegate { 
                GameDebug.Log("Play video failed");
            });
    }

    public void HideInterstitialAd()
    {
        //AdManager.HideInterstitialAd();
    }

    public void ShowBanner()
    {
        AdManager.ShowBanner();
    }

    public void HideBanner()
    {
        AdManager.HideBanner();
    }
    
}